
let num = 0;
document.addEventListener("keydown",e=>{
    if(e.code === "Space"){
        num ++;
        console.log(num);
        if(num==3){
            document.body.style["backgroundColor"] = "red";
        }
    }
})